﻿
namespace Cos.Module.CMS.NHibernate.Test
{
    using System;

    using Cos.Core.NHibernate;
    using Cos.Core.NHibernate.Tests;

    using NUnit.Framework;

    [TestFixture]
    public class VideoCultureDataModelFixture : ModuleFixtureBase
    {
        [Test]
        public void CanMapVideoCultureDataModel()
        {
            new PersistenceSpecification<VideoCultureDataModel>(Session)
                //.CheckReference(x => x.VideoId, this.Video.Id)
                //.CheckReference(x => x.CultureCode, this.Culture.Id)
                .CheckProperty(x => x.CreationDate, new DateTime(2000, 02, 05))
                .CheckProperty(x => x.ModificationDate, new DateTime(2011, 01, 01))
                .CheckProperty(x => x.ApprobationDate, new DateTime(2005, 10, 10))
                .CheckProperty(x => x.AuthorID, 22)
                .CheckProperty(x => x.Title, "Test title")
                .CheckProperty(x => x.Description, "yoyoyo")
                .CheckProperty(x => x.VideoFile, "my vid")
                .CheckProperty(x => x.VideoFilePreview, "holywood")
                .CheckProperty(x => x.ImageFile, "pam")
                .CheckProperty(x => x.ImageFilePreview, "ppp")
                .CheckProperty(x => x.IsVisible, true)
                .CheckProperty(x => x.IsVisiblePreview, false)
                .CheckProperty(x => x.VideoStatus, "null")
                .CheckProperty(x => x.Duration, "2000")
                .VerifyTheMappings();
        }
    }
}
